package com.lh.pattern.obvious;

import java.util.Enumeration;
import java.util.Vector;

public class DemoSource {
	private Vector repository = new Vector();

	DemoListener dl;

	public DemoSource()

	{

	}

	public void addDemoListener(DemoListener dl)

	{

		repository.addElement(dl);

	}

	public void notifyDemoEvent()

	{

		Enumeration enum3 = repository.elements();

		while (enum3.hasMoreElements())

		{

			dl = (DemoListener) enum3.nextElement();

			dl.demoEvent(new DemoEvent(this));

		}

	}
}
